import http from "@/api";
/**
 * @name 系统设置模块
 */
// 获取字典类型列表
export const zilxApi = params => {
  return http.get(`/system/dict/type/list`, params, { loading: false });
};

//新增字典类型
export const addzdApi = params => {
  return http.post(`/system/dict/type`, params, { loading: false });
};

//查询字典类型详情
export const updateApi = params => {
  return http.get(`/system/dict/type/getInfo`, params, { loading: false });
};
//修改字典类型
export const upsaveApi = params => {
  return http.put(`/system/dict/type`, params, { loading: false });
};

//删除字典类型
export const deleteApi = params => {
  return http.delete(`/system/dict/type/${params.e}`, params, { loading: false });
};
//刷新字典缓存
export const refreshCache = params => {
  return http.delete(`/system/dict/type/refreshCache`, params, { loading: false });
};
//字典详情的
export const seekdataApi = params => {
  return http.get(`/system/dict/data/typeByType`, params, { loading: false });
};
export const datadApi = params => {
  return http.post(`/system/dict/data`, params, { loading: false });
};
export const deldezi = params => {
  return http.delete(`/system/dict/data/${params.e}`, params, { loading: false });
};

/**
 *
 * 项目的相关节后
 *
 */
//新增项目
export const teamApi = params => {
  return http.post(`/system/team`, params, { loading: false });
};
export const addlistApi = params => {
  return http.get(`/system/team/list`, params, { loading: false });
};
export const deldexmid = params => {
  return http.delete(`/system/team/${params.e}`, params, { loading: false });
};
export const xqxmApi = params => {
  return http.get(`/system/team/${params.e}`, params, { loading: false });
};

export const xmsaveApi = params => {
  return http.put(`/system/team`, params, { loading: false });
};
export const getRouters = params => {
  return http.get(`/getRouters`, params, { loading: false });
};

export const jslist = params => {
  return http.get(`/system/role/list`, params, { loading: false });
};
export const addroleApi = params => {
  return http.post(`/system/role`, params, { loading: false });
};
export const cxjsApi = params => {
  return http.get(`/system/role/getInfo`, params, { loading: false });
};
export const xgajsApi = params => {
  return http.put(`/system/role`, params, { loading: false });
};
export const deldejsid = params => {
  return http.delete(`/system/user/${params.e}`, params, { loading: false });
};

export const getyhApi = params => {
  return http.get(`/system/user/list`, params, { loading: false });
};
export const getxmzApi = params => {
  return http.get(`/system/team/optionselect`, params, { loading: false });
};
export const getjueseApi = params => {
  return http.get(`/system/role/optionselect`, params, { loading: false });
};
export const adduserApi = params => {
  return http.post(`/system/user`, params, { loading: false });
};
export const getInfoApi = params => {
  return http.get(`/system/user/getInfo`, params, { loading: false });
};

export const xgyhApi = params => {
  return http.put(`/system/user`, params, { loading: false });
};
export const deldeyh = params => {
  return http.delete(`/system/user/${params.e}`, params, { loading: false });
};

export const resetPwdaApi = params => {
  return http.put(`/system/user/profile/updatePwd?oldPassword=${params.oldPassword}&newPassword=${params.newPassword}`, params, {
    loading: false
  });
};

export const Passwordmange = params => {
  return http.put(`/system/user/resetPwd`, params, {
    loading: false
  });
};

export const getxmlaApi = params => {
  return http.get(`/system/team/optionByUserId`, params, { loading: false });
};

/**
 * 化验项目
 */
//获取列表
export const hyxmListApi = params => {
  return http.get(`/system/testItem/list`, params, { loading: false });
};
//新增化验项目
export const addhyApi = params => {
  return http.post(`/system/testItem`, params, { loading: false });
};
export const updatehyApi = params => {
  return http.put(`/system/testItem`, params, { loading: false });
};
export const deletehyApi = params => {
  return http.delete(`/system/testItem/${params.e}`, params, { loading: false });
};
export const BylabApi = params => {
  return http.get(`/system/testItem/getInfo`, params, { loading: false });
};
/**
 * 药品项目
 */
export const getyfListApi = params => {
  return http.get(`/system/medicine/list`, params, { loading: false });
};
export const addypApi = params => {
  return http.post(`/system/medicine`, params, { loading: false });
};
export const updateypApi = params => {
  return http.put(`/system/medicine`, params, { loading: false });
};
export const getypinfoApi = params => {
  return http.get(`/system/medicine/getInfo`, params, { loading: false });
};

export const deleteypApi = params => {
  return http.delete(`/system/medicine/${params.e}`, params, { loading: false });
};
/**
 * 上传头像
 */
export const uploadhead = params => {
  return http.post(`/system/user/profile/avatar`, params, { loading: false });
};
